package com.heima.stu_system;

public class HighSchoolStudent extends Student{
    private String major;

    public HighSchoolStudent(String major) {
        this.major = major;
    }

    public HighSchoolStudent(String name, int age, String major) {
        super(name, age);
        this.major = major;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    @Override
    public void study() {
        System.out.println(getAge() + " 岁的 " + getMajor() + "专业的 " + getName() + " 在宿舍里猛猛打游戏");
    }
}
